<!--作者:于大明-->
<template>
	<view class="add-market-body mt-2">

		<uni-segmented-control :current="current" :values="calItems" @clickItem="current=parseInt($event.currentIndex)"
			styleType="button" activeColor="#007aff">
		</uni-segmented-control>

		<view v-show="current==0" class="font-weight bg-white p-2">
			<view>用户通过你的专属链接注册,享有以下收益:</view>
			<view>1.此后产生的所有课程消费的<text class="text-red">50%</text>归你所有，包括开通会员。</view>
			<view>2.此后产生的所有1对1服务消费的<text class="text-red">30%</text>分成。</view>

			<view class="d-flex mt-1">
				<text class="flex-shrink" style="line-height: 3.5;">我的专属链接:</text>
				<view v-if="getMyMarketInfoOut.data.userInfoMarketUrl">
					<a :href="getMyMarketInfoOut.data.userInfoMarketUrl">
						{{getMyMarketInfoOut.data.userInfoMarketUrl}}
					</a>
					<button type="primary" size="mini"  style="top: 10rpx;" 
						@tap="$util.copyText(getMyMarketInfoOut.data.userInfoMarketUrl)">复制</button>
					<button type="primary" size="mini"  
							@tap="$refs.msc.open()">获取分享二维码</button>
				</view>
				<view v-else class="text-primary ml-1">
					成为推广人后显示
				</view>
			</view>

		</view>

		<view v-show="current==1">
			<view class="text-right mr-1">共:<text class="text-warning">{{inviateDatas.length}}</text>人</view>
			<user-info-item :inputItem="item" v-for="(item,index) in inviateDatas" :key="index"></user-info-item>
		</view>

		<view v-show="current==2">
			 
			<view class="text-right mt-1 text-warning">
				<text class=" text-warning">每周日可提现,周一统一处理,微信转账,可提现金额：<text class="text-price text-orange">{{$filters['formatMoney'](allWaitMoney)}}</text></text>
				<!-- <text class="uni-tag-primary" @tap="$emit('getMoney')">提现</text> -->
				<button type="warn" size="mini" @tap="$emit('getMoney')">提现</button>
			</view>
			<order-trans-item :inputItem="item" v-for="(item,index) in transferDatas" :key="index"></order-trans-item>
		</view>
		
		<ma-share-code ref="msc" :text="getMyMarketInfoOut.data.userInfoMarketUrl"></ma-share-code>
	</view>
</template>

<script src="./add-market-body.js"></script>

<style lang="less" scoped>
	@import url('add-market-body.less');
</style>